package com.woniuxy.service.impl;

import com.woniuxy.dao.RoleDao;
import com.woniuxy.service.RbacRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class RbacRoleServiceImpl implements RbacRoleService {
    @Autowired   //默认先使用byType
    RoleDao roleDao;

    @Override
    public void addOne() {
//        try {
//            int i = 1/0;
//        }catch (Exception e) {
//            throw new RuntimeException("分母不能为0");
//        }
        Map one = roleDao.findOne(1);
        one.values().forEach(x -> System.out.println(x));
    }
}
